%function plotH=plotCross(pD,proj,colors);%2D plot of projected Mean and StDev for an array of GaussMixD objects%Input:%pD=        a single GaussMixD object or multidim array of GaussMixD objects%proj=      vector with indices of vector elements to plot%           length(proj)==2 (but 3 should maybe also be allowed%colors=    string with plot color codes, 'rgb' etc%%Result:%plotH=    vector with plot handles to graph objects%%Arne Leijon 2009-07-21 testedfunction plotH=plotCross(pD,proj,colors)if length(proj)~=2    error('Can only plot 2-D');end;if nargin<3    colors='rbgk';end;if isempty(colors)    colors='rbgk';end;nObj=numel(pD);plotH=[];%storage for plot handlesfor i=1:nObj    cObj=colors(1+mod(i-1,length(colors)));%circulate among given colors    plotH=[plotH,plotCross(pD(i).Gaussians,proj,cObj)];%all sub-crosses same color    hold on;end;hold off;